#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
	double a, b;
	scanf("%lf%lf", &a, &b);
	double c = 2 * (a + b);
	double s = a * b;
	printf("%.2lf\n", c);
	printf("%.2lf", s);
	return 0;
}